<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看管理员</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
    <script src="js/jquery-1.9.1.min.js"></script>
</head>
<body>
<div class="layui-fluid">
    <table class="layui-table">
        <thead>
        <tr>
            <th>编号</th>
            <th>用户名</th>
            <th>角色</th>
            <th>添加时间</th>
            <th>编辑</th>
            <th>删除</th>
        </tr>
        </thead>
        <?php
        foreach($dataArr as $v){ ?>
        <tr>
            <td><?=$v['userID'] ?></td>
            <td><?=$v['userName'] ?></td>
            <td><?=$v['userRoleID']==0?'超级管理员':'普通管理员'?></td>
            <td><?=$v['addDate'] ?></td>
            <td><a class="layui-btn layui-btn-sm" href="adminEdit.php?userID=<?=$v['userID']?>"> 编辑</a></td>
            <td><a class="layui-btn layui-btn-sm layui-btn-danger del" href="adminDel.php?userID=<?=$v['userID']?>">删除</a></td>
        </tr>
        <?php   } ?>

    </table>
    <div style="text-align: center">
        <?=$pageHtml?>
    </div>
</div>
<script>
    layui.use('layer', function () {
        var layer = layui.layer;
        $('.del').on('click', function () {
            var url = $(this).attr('href');
            layer.confirm('确认删除吗', {icon: 3, title: '温馨提示'}, function (index) {
                location.href = url;
                layer.close(index);
            });
            return false;
        })
    });
    $(function () {
        $('#righttitle', window.parent.document).text($('title').text());
    });

</script>
</body>
</html>